package com.hewep.demo.nio;

/*
 * nio + 多线程 + 观察者模式 = 多线程nio服务器
 */
public class Test {

	public static void main(String[] args) throws Exception{
		OnReadHandler readHandler = new OnReadHandler();
		OnWriteHandler writeHandler = new OnWriteHandler();
		Notify notify = Notify.getInstance();
		notify.addListener(writeHandler);
		notify.addListener(readHandler);
		Server server = new Server(5100);
		Thread t = new Thread(server);
		t.start();
	}
}
